﻿@model IEnumerable<JuniorProject.Models.Employee.HiringSpecialistAppModel>

@{
    ViewBag.Title = "Search";
}

@section scripts
{
    <link href="@Url.Content("~/Content/themes/base/jquery-tablesorter.css")" rel="stylesheet" type="text/css" />
    <script src="@Url.Content("~/Scripts/jquery.tablesorter.js")" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            $('table').tablesorter({ headers: { 5: { sorter: false } }, sortList: [[0, 0]] });
        });
    </script>
}

<h2>
Submitted Applications
</h2>
<br />

<table id="table" class="tablesorter">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.ID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.LastName)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.JobPostingID)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.PostingDate)
            </th>
            <th>
                Background Check
            </th>
        </tr>
    </thead>

    <tbody>
    @foreach (var item in Model) {
        <tr>
            <td>
                @Html.ActionLink(item.ID.ToString() + "-" + item.UserID.ToString(),
                "ApplicationDetails_Home", new { id=item.ID })
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.LastName)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.JobPostingID)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.PostingDate.Month).
                @Html.DisplayFor(modelItem => item.PostingDate.Day).
                @Html.DisplayFor(modelItem => item.PostingDate.Year)
            </td>
            <td>
                @Html.DisplayFor(modelItem => item.BGCheck)
            </td>
        </tr>
        }
    </tbody>
</table>

<p>
    @Html.Partial("_EmployeeBottomNavBar", ViewData["AccessLevel"])
</p>